#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>
/********found********/
double fun(int n)
{
    int a = 1;
    int b = 2;
    double s = 0;
    int c;
    for (int i = 0; i < n; i++)
    {
        s += 1.0 * b / a;
        c = a;
        a = b;
        /********found********/
        b += c;
    }
    return s;
}
void main()
{
    int n;
    scanf("%d", &n);
    printf("%lf\n", fun(n));
}
